package com.starhub.application.model.enums;

/**
 * 向量模型类型枚举
 */
public enum VectorModelTypeEnum {
    EmbeddingV1("Embedding-V1", ChatProviderEnums.Baidu, "百度向量模型", 384, 384),
    Custom("custom", ChatProviderEnums.Custom, "自定义向量模型", 0, 0),
    // 可以继续添加其他厂商的向量模型
    ;

    private final String code;
    private final ChatProviderEnums chatProvider;
    private final String desc;
    private final int dimension;
    private final int maxToken;

    VectorModelTypeEnum(String code, ChatProviderEnums chatProvider, String desc, int dimension, int maxToken) {
        this.code = code;
        this.chatProvider = chatProvider;
        this.desc = desc;
        this.dimension = dimension;
        this.maxToken = maxToken;
    }

    public String getCode() {
        return code;
    }

    public ChatProviderEnums getChatProvider() {
        return chatProvider;
    }   

    public String getDesc() {
        return desc;
    }

    public int getDimension() {
        return dimension;
    }

    public int getMaxToken() {
        return maxToken;
    }

    public static VectorModelTypeEnum getByCode(String code) {
        for (VectorModelTypeEnum type : values()) {
            if (type.getCode().equals(code)) {
                return type;
            }
        }
        return null;
    }
} 